<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
<title><s:property value="#session.titleDesc"/></title>
<%@ include file="/common/meta.jsp"%>
<SCRIPT type="text/javascript">
<!--	
	function submitNameCode(id, name, lang) {
		var optionName = '#optionName' + id;
		var ncMsg = '#resultMessage' + id;
		var subButtom = '#subButtom' + id;
		var urlpath = $("#context_path").val() + "/product/syn!modifyOptionName.action";
		var ajaxPara = id + "#" + name + "#" + lang + "#" + $(optionName).val();
		$(ncMsg).html("正在处理中……");
		$(subButtom).hide();
		$.post(urlpath, { "ajaxPara":ajaxPara},
			function(data){
				if(data == "OK"){
					$(ncMsg).html("修改成功");
			    }else{
					$(subButtom).show();
			    	$(ncMsg).html(data);
			    }
			},"text");
	}
//-->
</SCRIPT>
</head>
<body>
<%@ include file="/common/center-top.jsp"%>	
<!-- 网页主显示区，填写表单 -->
<div class="titleDiv">更新属性项名称 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<a href="${ctp}/product/syn!toConfigOptionCode.action">下一步：配置统一中文属性项名称</a></div>
<input type="hidden" id="context_path" value="${ctp}"/>
<table class="tableList" cellspacing="1" cellspacing="0" cellpadding="0">
	<tr>
		<th>属性名称</th>
		<th>语言</th>
		<th>新属性名称</th>
		<th>操作</th>
	</tr>
	<s:iterator value="optionPage.result" var="uvar">
		<tr>
			<td>${uvar.optionName}</td>
			<td>${uvar.langName}</td>
			<td><input type="text" id="optionName${uvar.id}"/></td>
			<td>
				<span id="subButtom${uvar.id}" onclick="submitNameCode('${uvar.id}', '${uvar.optionName}', '${uvar.langId}');" style="cursor: pointer;">提交</span>
				&nbsp;&nbsp;
				<span id="resultMessage${uvar.id}" style="color: red;"></span>
			</td>
		</tr>
	</s:iterator>
</table>
<cus:page pageBean="optionPage" action="/product/syn!toConfigOptionName.action" cssClass="scott"></cus:page>
<%@ include file="/common/center-down.jsp"%>				
</body>
</html>